import http from "@/utils/fetch";

export function login(params) {
  return http.post("/Admin/Login", params);
}

export function logout() {
  return http.get("/Admin/LoginOut");
}

// 获取用户菜单权限
export function getAuthRule() {
  return http.post("/Admin/Auth/getAuthRule");
}

// 获取验证码
export function sendMobileCode(mobile) {
  return http.post("/Admin/Verify/sendCode", { mobile }, true);
}

// 编辑密码
export function editPwd(params) {
  return http.post("/Admin/Auth/editPwd", params);
}

// 忘记密码
export function forgetPwd(params) {
  return http.post("/Admin/Login/forgetPwd", params);
}
